package com.icloud.common.database.enums;

import lombok.Getter;

@Getter
public enum WithdrawStateEnum {
    UNHANDLED("UNHANDLED"), // 待处理
    CANCEL("CANCEL"), // 已取消
    HANDLED("HANDLED"); // 已完成

    private final String code;

    WithdrawStateEnum(String code){
        this.code = code;
    }

    public static WithdrawStateEnum byCode(String code) {
        for (WithdrawStateEnum e: WithdrawStateEnum.values()) {
            if (e.code.equalsIgnoreCase(code)) {
                return e;
            }
        }
        return null;
    }
}
